Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Internet and Regional Text Encoding Names /


TECCountMailTextEncodings

Counts and returns the number of currently supported e-mail encodings for a specified region.

pascal OSStatus TECCountMailTextEncodings (
                     RegionCode locale, 
                     ItemCount *numberEncodings);
locale
A Mac OS region code indicating the locale for which you want to count encodings. A region code designates a combination of language, writing system, and geographic region; the region may not correspond to a particular country (for example, Swiss French or Arabic).
numberEncodings
A pointer to a value of type ItemCount. On output, this value indicates the number of currently supported e-mail encodings for the region.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter.
DISCUSSION
The TECCountMailTextEncodings function counts and returns the number of e-mail text encodings currently available for a specified region. This number tells you what size array you must allocate in a parameter of the function TECGetMailTextEncodings (page 82). Therefore, you should call this function before you call TECGetMailTextEncodings in order to accommodate the specifications for all of these text encodings.

TECCountMailTextEncodings counts each instance of the same encoding. That is, if different conversion plug-ins support the same e-mail text encoding for any of the conversion processes they provide, this function includes each instance of the text encoding in its sum. Consequently, the same text encoding may be counted more than once. For example, the Japanese Encodings plug-in supports Mac OS Japanese and so does the Unicode Encodings plug-in. However, since the TECGetMailTextEncodings function does not return duplicate text encoding specifications, TECCountMailTextEncodings may return a number greater than the number of array elements required.

SEE ALSO
The function TECCountAvailableTextEncodings (page 66)

The function TECGetAvailableTextEncodings (page 67)

The function TECCountWebTextEncodings (page 77)

The function TECGetTextEncodingFromInternetName (page 76)

The function TECGetWebTextEncodings (page 79)

The function GetTextEncodingName (page 52)

The region codes section of "Script Manager" in Inside Macintosh: Text


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997